Incremental type-checking for free: using scope graphs to derive incremental type-checkers

نویسندگان

چکیده

Fast analysis response times in IDEs are essential for a good editor experience. Incremental type-checking can provide that scalable fashion. However, existing techniques not reusable between languages. Moreover, mutual and dynamic dependencies preclude traditional approaches to incrementality. This makes finding automatic incremental challenging but important open question. In this paper, we present technique automatically derives type-checkers from type system specifications written the Statix meta-DSL. We use name resolution queries scope graphs (a generic model of binding embedded Statix) derive compilation units. A novel query confirmation algorithm finds which answer changed due an edit program. Only units with such require reanalysis. The effectiveness is improved by (1) splitting task into context-free context-sensitive part, (2) reusing mechanism resolve dependencies. yields any specification. Compared non-incremental parallel execution, achieve speedups up 147x on synthetic benchmarks, 21x real-world projects, initial overheads below 10%. suggests our framework efficient wide range languages supported Statix.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Safe Incremental Type Checking

We study the problem of verifying the well-typing of terms, not in a batch fashion, as it is usually the case for typed languages, but incrementally, that is by sequentially modifying a term, and reverifying each time only a smaller amount of information than the whole term, still ensuring that it is well-typed.

متن کامل

Incremental Cryptography and Memory Checkers

We introduce the relationship between incremental cryptography and memory checkers. We present an incremental message authentication scheme based on the XOR MACs which supports insertion, deletion and other single block operations. Our scheme takes only a constant number of pseudorandom function evaluations for each update step and produces smaller authentication codes than the tree scheme pres...

متن کامل

A Case for Using Data-Flow Analysis to Optimize Incremental Scope-Bounded Checking

Given a program and its correctness specification, scope-bounded checking encodes control-flow and data-flow of bounded code segments into declarative formulas and uses constraint solvers to search for correctness violations. For non-trivial programs, the formulas are often complex and represent a heavy workload that can choke the solvers. To scale scope-bounded checking, our previous work intr...

متن کامل

An Incremental Approach to Scope-Bounded Checking Using a Lightweight Formal Method

We present a novel approach to optimize scope-bounded checking programs using a relational constraint solver. Given a program and its correctness specification, the traditional approach translates a bounded code segment of the entire program into a declarative formula and uses a constraint solver to search for any correctness violations. Scalability is a key issue with such approaches since for...

متن کامل

Incremental Type Inference for Software Engineering

Software engineering focused type inference can enhance programmer productivity in statically typed objectoriented languages. Type inference is a system of automatically inferring the argument and return types of a function. It provides considerable programming convenience, because the programmer can realize the benefits of a statically typed language without manually entering the type annotati...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

ژورنال

عنوان ژورنال: Proceedings of the ACM on programming languages

سال: 2022

ISSN: ['2475-1421']

DOI: https://doi.org/10.1145/3563303